{% extends "./inc/base.html" %}
{% block content %}
<section class="vbox">

    <header class="header bg-light dk">
        <ul class="nav nav-tabs pull-left">
            <li class=""><a href="/admin/auth/access/?id={{controller.get('id')}}"><i class="fa fa-comments text-muted"></i> 权限设置 </a></li>
            <li class=""><a href="/admin/auth/catepriv/?id={{controller.get('id')}}"><i class="fa fa-user text-muted"></i> 栏目权限</a></li>
            <li class="active"><a href="/admin/auth/userlist/?id={{controller.get('id')}}"><i class="fa fa-user text-muted"></i> 成员管理</a></li>
        </ul>
    </header>
    <section class="scrollable wrapper">

        <section class="panel panel-default">
            <header class="panel-heading">
                {{controller.meta_title}}
                <i data-title="只有新增了字段，数据库表才会真正建立" data-placement="bottom" data-toggle="tooltip" class="fa fa-info-sign text-muted" data-original-title="" title=""><i class="fa fa-question-circle"></i></i>
            </header>
            <div class="table-responsive">
                <table class="table table-striped b-t b-light">
                    <thead>
                    <tr>
                        <th style="width:20px;"><label class="checkbox m-n i-checks"><input type="checkbox"><i></i></label></th>
                        <th style="width:50px;">ID</th>
                        <th >用户名</th>
                        <th class="">所属角色</th>
                        <th class="">最后登录id	</th>
                        <th class="">最后登录时间</th>
                        <th>E-mail</th>
                        <th>真实姓名</th>
                        <th >操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for item in userlist %}
                    <tr>
                        <td>{%if item.issystem !=1%}<label class="checkbox m-n i-checks"><input class="ids" type="checkbox" name="ids" value="{{item.groupid}}" ><i></i></label>{%endif%}</td>
                        <td>{{item.id}}</td>
                        <td>{{item.username}}</td>
                        <td>{{item.role}}</td>

                        <td>{{item.last_login_ip|int2ip}}</td>
                        <td>{{item.last_login_time|moment('YYYY-MM-DD HH:mm:ss')}}</td>
                        <td>
                            {{item.email}}
                        </td>
                        <td>
                            {{item.real_name}}
                        </td>
                        <td>
                            <a href="/admin/user/edituser/?id={{item.id}}" class="text-info" data-toggle="ajaxModal">编辑</a>
                        </td>
                    </tr>
                    {% else %}
                    <tr><td colspan="14"><div class="alert alert-warning alert-block">
                        <button data-dismiss="alert" class="close" type="button">×</button>
                        <p>木有，成员！！！</p>
                    </div></td></tr>

                    {% endfor %}


                    </tbody>
                </table>
            </div>
            <footer class="panel-footer">
                <div class="row">


                    <div class="col-sm-12 text-right text-center-xs">
                        {{pagerData | safe}}
                    </div>
                </div>
            </footer>
        </section>
    </section>
</section>

{% endblock %}
{% block script%}
<script src="/static/admin/js/parsley/parsley.min.js"></script>
<script src="/static/admin/js/parsley/parsley.extend.js"></script>
<script src="/static/admin/js/datepicker/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<script src="/static/admin/js/datepicker/locales/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>
<script>

</script>
{% endblock %}